Activity has begun in recent years for international standardization of a high-efficiency encoding method to serve as a successor to H.264/MPEG-4 AVC (hereinafter, “H.264”). To this end, JCT-VC (Joint Collaborative Team on Video Coding) has been established between ISO/IEC and ITU-T. JCT-VC is proceeding with standardization of High Efficiency Video Coding (hereinafter, “HEVC”). ITU-T was ratified as the H.265 encoding format in April 2013. Addition of functions such as scalable coding, range extensions, screen content coding, and so forth continue to be studied for standardization of HEVC.
Various encoding tools have been developed for the standardization of HEVC, realizing high encoding efficiency. HEVC also employs the intra coding mode and inter encoding mode as block coding modes, such as the encoding formats that have been employed up to H.264. The inter coding mode references image data encoded/decoded before in time, and performs encoding by performing calculation regarding similar blocks. The intra encoding mode predicts blocks from already-decoded pixels nearby a block to be encoded/decoded, without referencing image data encoded/decoded before in time.
HEVC also has newly employed the merge mode for motion vector prediction in the inter coding mode. Merge mode is a technology where a block spatially/temporally nearby, regarding which motion information can be used as it is, is selected, and an index indicating the position thereof is encoded. This has been done to improve coding efficiency. Further, the image data of the block can be used as it is. That is to say, in a case where prediction error in the image data is 0, skip coding can be used. In this case, encoding can be performed simply by sending a flag indicating whether or not skip coding was performed, and merge mode code, so further improvement in coding efficiency was enabled.
A format is being proposed for the intra coding mode as well, where similar blocks in already encoded/decoded data is used for prediction in image data to be encoded/decoded, as a new function. This function is called Intra Block Copying coding. A particular aim thereof is to improve coding efficiency in an image taken by a camera which is not a natural image, such as an artificial image like a computer screen for example, by performing prediction from an already-encoded image in image data to be encoded/decoded. This takes advantage of the fact that there is repetitive image data, such as characters and textures in the image data to be encoded/decoded, in such an artificial image. To perform prediction within a picture, a regenerated image of already-encoded image data is searched for, a similar block is taken to be a prediction block, that position is represented by a vector, a prediction error block is calculated from the image data of the prediction block and the image data of the block to be encoded, and encoded. This vector is called a copy vector, to distinguish from a motion vector in the inter coding mode, in particular.
In copy vector coding, the encoding is performed by mvd_coding( ) as described in NPL 1. The syntax of mvd_coding( ) encodes the difference as to a copy vector predicted from a neighboring copy vector, as described in NPL 2. Accordingly, no improvement could be expected in coding efficiency by selecting a block temporally/spatially nearby a block to be encoded of which block the motion information can be used as it is, and encoding an index indicating the position thereof, as in the merge mode.